import React, { Component } from 'react'

import Hello from "./components/Hello";

export default class LayOut extends Component {
  constructor(props) {
    super(props)
    this.state = {
      count: 0
    }
  }

  add = () => {
    this.setState({
      count: this.state.count+=1
    })
  }

  render() {
    const { count } = this.state
    return (
      <div>LayOut
        <button onClick={this.add}>修改 count的值：</button>
        <Hello count={count} />
      </div>
    )
  }
}
